2.4.áInstalling on Solaris hosts

For the various versions of Solaris that we support as host operating systems, please refer to Sectioná1.4, “Supported host operating systems”.

If you have a previously installed instance of VirtualBox on your Solaris host, please uninstall it first before installing a new instance. Refer to Sectioná2.4.3, “Uninstallation” for uninstall instructions.

2.4.1.áPerforming the installation

VirtualBox is available as a standard Solaris package. Download the appropriate package for your system. The installation must be performed as root and from the global zone as the VirtualBox installer loads kernel drivers which cannot be done from non-global zones. To verify which zone you are currently in, execute the zonename command. Execute the following commands:

gunzip -cd VirtualBox-2.0.6-SunOS-x86.tar.gz | tar xvf -

Starting with VirtualBox 1.6.2 we ship the VirtualBox kernel interface module (vbi). The purpose of this module is to shield the VirtualBox kernel driver from changes to the SunOS kernel. If you do not have vbi already installed (check for the existence of the file /platform/i86pc/kernel/misc/vbi) install it by executing the command:

pkgadd -G -d VirtualBoxKern-2.0.6-SunOS.pkg

Future versions of OpenSolaris may ship the VirtualBox kernel interface module, in which case you can remove this one before upgrading OpenSolaris.

Next you should install the main VirtualBox package using:

pkgadd -d VirtualBox-2.0.6-SunOS-x86.pkg

Note

If you are using Solaris Zones, to install VirtualBox only into the current zone and not into any other zone, use pkgadd -G. For more information refer to the pkgadd manual; see also Sectioná2.4.5, “Configuring a zone for running VirtualBox”.

The installer will then prompt you to enter the package you wish to install. Choose "1" or "all" and proceed. Next the installer will ask you if you want to allow the postinstall script to be executed. Choose "y" and proceed as it is essential to execute this script which installs the VirtualBox kernel module. Following this confirmation the installer will install VirtualBox and execute the postinstall setup script.

Once the postinstall script has been executed your installation is now complete. You may now safely delete the uncompressed package and autoresponse files from your system. VirtualBox would be installed in /opt/VirtualBox.

2.4.2.áStarting VirtualBox on Solaris

The easiest way to start a VirtualBox program is by running the program of your choice (VirtualBox, VBoxManage, VBoxSDL or VBoxHeadless) from a terminal. These are symbolic links to VBox.sh that start the required program for you.

Alternatively, you can directly invoke the required programs from /opt/VirtualBox. Using the links provided is easier as you do not have to type the full path.

You can configure some elements of the VirtualBox Qt GUI such as fonts and colours by executing VBoxQtconfig from the terminal.

2.4.3.áUninstallation

Uninstallation of VirtualBox on Solaris requires root permissions. To perform the uninstallation, start a root terminal session and execute:

pkgrm SUNWvbox

After confirmation, this will remove VirtualBox from your system.

To uninstall the VirtualBox kernel interface module, execute:

pkgrm SUNWvboxkern

2.4.4.áUnattended installation

To perform a non-interactive installation of VirtualBox we have provided a response file named autoresponse that the installer will use for responses to inputs rather than ask them from you.

Extract the tar.gz package as described in the normal installation. Then open a root terminal session and execute:

pkgadd -d VirtualBox-2.0.6-SunOS-x86 -n -a autoresponse SUNWvbox

To perform a non-interactive uninstallation, open a root terminal session and execute:

pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox

2.4.5.áConfiguring a zone for running VirtualBox

Starting with VirtualBox 1.6 it is possible to run VirtualBox from within Solaris zones. For an introduction of Solaris zones, please refer to http://www.sun.com/bigadmin/features/articles/solaris_zones.jsp.

Assuming that VirtualBox has already been installed into your zone, you need to give the zone access to VirtualBox's device node. This is done by performing the following steps. Start a root terminal and execute:

zonecfg -z vboxzone

Inside the zonecfg prompt add the device resource and match properties to the zone. Here's how it can be done:

zonecfg:vboxzone>add device
zonecfg:vboxzone:device>set match=/dev/vboxdrv
zonecfg:vboxzone:device>end
zonecfg:vboxzone>verify
zonecfg:vboxzone>exit

Replace "vboxzone" with the name of the zone in which you intend to run VirtualBox. Next reboot the zone using zoneadm and you should be able to run VirtualBox from within the configured zone.